package org.feiyy.client;

import org.feiyy.common.entity.SysLogEntity;
import org.feiyy.common.entity.SysUserEntity;
import org.feiyy.common.entity.SysUserTokenEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.Set;


@FeignClient("provide-sys")
public interface ShiroClient {


    @GetMapping("/sys/shiro/getUserPermissions")
    public Set<String> getUserPermissions(@RequestParam Long userId);


    @GetMapping("/sys/shiro/queryByToken")
    public SysUserTokenEntity queryByToken(@RequestParam String token);


    @GetMapping("/sys/shiro/queryUser")
    public SysUserEntity queryUser(@RequestParam Long userId);

    @PostMapping(value = "/sys/log/save", consumes = "application/json")
    void save(@RequestBody SysLogEntity sysLogEntity);

}
